Skip to main content

All Questions

0votes
1answer
467views

How to replace only specific 20 characters using sed

file.dat No Name Title Publisher Edition 1001 Programming in Java By BPB Balaguruswamy BPB Second 1002 Computer Networks ...
ajinzrathod's user avatar
3votes
6answers
3kviews

How to add spaces in certain columns of a file in Linux

I have a text file containing 1000 lines in this format: 001122 abc def ghi 334455 xyz aaa bbb 667788 ccc ccc ddd How can I convert it into this format using a Linux command by adding spaces to ...
Rozer's user avatar
3votes
3answers
116views

Make a line blank, by returning everything on that line down in bash

I want to alter a text file. Let's say I have some text on line 22, and I want to make line 22 blank and move down the text on line 22 down to line 23. To illustrate, I want to turn this (printf 'Some ...
jf4i2d's user avatar
0votes
2answers
157views

How to combine two text formatting commands into one?

How does one combine two commands like the ones shown below into one command with one output file? first command: printf '%s\n' {001..500} input > output second command: sed 's/^/PREFIX /; s/$/ ...
Anonymous's user avatar

close